<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class Teacher extends Validate
{

    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'institution_id'=>['require'],
        'name'=>['require'],
        'phone'=>['require'],
        'area'=>['require'],
        'address'=>['require'],
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'institution_id.require'=>'所属机构不能为空',
        'name.require'=>'教师姓名不能为空',
        'phone.require'=>'教师联系电话不能为空',
        'area.require'=>'教师所在地区不能为空',
        'address.require'=>'教师详细地址不能为空',
    ];
}
